<template>
  <div class="nav_bar">
    <van-nav-bar :title="props?.title"  :left-text=" !!props?.isNav ? '返回' : null" :left-arrow="props?.isNav"
    @click-left="onClickLeft"/>
  </div>
</template>

<script setup>
import { useRouter } from 'vue-router';
const props = defineProps({
  title: {
    type: String,
    default:'标题',
  },
  isNav:{
    type: Boolean,
    default:false
  }
});
const router = useRouter();
const onClickLeft = () => {
  router.back();
};
</script>

<style lang="less" scoped>

</style>
